let solc = require('solc')
let fs = require('fs')

//1. 加载编译器
//2. 获取.sol源码
//3. 编译 从而获取abi，bytecode

let sourceInfo = fs.readFileSync('./contracts/Inbox.sol', 'utf-8')

// console.log('sourceInfo :', sourceInfo.toString())

var output = solc.compile(sourceInfo, 1)

// console.log('output:', output)
module.exports = output.contracts[':Inbox']


